package com.company.观察者模式;

public class Customer implements Observer{

    @Override
    public void update(Object arg) {
        int priceVar = (Integer)arg;
        if (priceVar>0){
            System.out.println("消费者：东西又贵了，不买了");
        }else if (priceVar<0){
            System.out.println("消费者：降价了，多买点");
        }
    }
}
